/*
 *  Copyright (c) 2011 Lukáš Karas <lukas.karas@centrum.cz>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 2 as
 *  published by the Free Software Foundation;
 *
 *  Software distributed under the License is distributed on an "AS IS"
 *  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
 *
 *  See the GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

package cz.karry.jtw;

import java.lang.management.ThreadInfo;

/**
 *
 * @author karry
 */
public class BlockedThreadInfo {

  long blockedCount;
  long blockedTime;
  private boolean warned;

  public BlockedThreadInfo(long blockedCount, long blockedTime) {
    this.blockedCount = blockedCount;
    this.blockedTime = blockedTime;
  }

  BlockedThreadInfo(ThreadInfo info) {
    this.blockedCount = info.getBlockedCount();
    this.blockedTime = info.getBlockedTime();
  }

  public long getBlockedCount() {
    return blockedCount;
  }

  public void setBlockedCount(long blockedCount) {
    this.blockedCount = blockedCount;
  }

  public long getBlockedTime() {
    return blockedTime;
  }

  public void setBlockedTime(long blockedTime) {
    this.blockedTime = blockedTime;
  }

  public void setWarned(boolean b) {
    warned = b;
  }

  public boolean warnedAlready() {
    return warned;
  }
}

